# Maintainer: Cowington Post <cowingtonpost@gmail.com>
pkgname=mdbook-katex
pkgver=0.8.0
pkgrel=0
pkgdesc="Preprocessor for mdbook to render LaTeX equations in HTML"
url="https://github.com/lzanini/mdbook-katex"
arch="all"
license="MIT"
depends="mdbook"
makedepends="
	cargo
	cargo-auditable
	"
source="https://github.com/lzanini/mdbook-katex/archive/refs/tags/v$pkgver/mdbook-katex-$pkgver.tar.gz"
options="!check" # no tests

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

package() {
	install -Dm755 target/release/mdbook-katex "$pkgdir"/usr/bin/mdbook-katex
}

sha512sums="
b7091b5985a552ef9b4cfad82855fd92f663f4b632bccda1904046c23549a22916deb6adea54e583d2edf3f08115db9868be464dfbdf3e090e8197999e4230ae  mdbook-katex-0.8.0.tar.gz
"
